Reduce lint errors / improve TS support #21
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #7 ...kind of 😕
Overview
Refactoring the codebase and getting the Wallet tests to cooperate ended up being a much bigger hassle than I anticipated. So in the interest of time and budget, for now we won't be refactoring to enable full TS support.
Instead, this PR removes all lint errors. There are two sources of Typescript lint errors that have been removed.
@typescript-eslint
package: These are disabled by section or line when necessary using the appropriate variant of// eslint-disable-this-line
// @ts-ignore
. A common use case of this is that Typescript doesn't recognize that methods from mixins do in fact exist on thethis
object, so those are always ignored with@ts-ignore
. Reading value from the global state is another common oneTesting this PR
npm install
to ensure everything is up to datenpm run lint
, and nothing should come up aside from an unrelated warningnpm run build
, and the build should succeed with no errorsnpm run test:e2e:CI
to make sure Cypress e2e tests passnpm run test:unit
to make sure Jest unit tests passnpm run dev
and ensure the app still works as epxectedPath Forward
As a result of this PR:
--no-verify
flag. This means that during future development we'll need to use the@ts-ignore
andeslint-disable-next-line
flags as appropriate. Be careful with using the@ts-ignore
flag and be sure it's the correct solution (if the app runs as expected, it should be safe to use)